'use strict';
(function() {

	ngApp.controller("userlogController", ["$scope", "userlogService", function($scope, userlogService) {
		console.info("userlogController....");

		//初始化翻页对象
		$scope.pagin = {
			pageSize: 10,
			pageIndex: 1,
			recordCnt: 0
		};

		//定义翻页方法
		$scope.showPage = function(pageIndex) {
			console.info("showPage...");
			userlogService.queryList($scope.pagin, function(resp) {
				$scope.pagin = resp.pagin;
				$scope.logs = resp.data;
			});
		}

		//显示第一页
		$scope.showPage(1);

	}]);

})();